/*
 * @Author: jiangjin
 * @Date: 2021-10-13 15:11:27
 * @LastEditTime: 2021-10-13 16:07:00
 * @LastEditors: jiangjin
 * @Description:
 *
 */

import { useStore } from '../.'
import { USER_UPDATE_USER_NUM_ACTION } from './actions'
import { USER_UPDATE_USER_NUM } from './mutations'

export function useUpdateUserNum() {
  const store = useStore()

  return () => {
    store.commit(USER_UPDATE_USER_NUM)
  }
}
export function useAsyncUseUpdateUserNum() {
  const store = useStore()

  return () => {
    store.dispatch(USER_UPDATE_USER_NUM_ACTION)
  }
}
